package com.pengshun.modules.domain;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.data.annotation.Transient;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

@Data
@Table(name = "jy_petrol_station_activity")
public class JyPetrolStationActivity implements Serializable {

    @ApiModelProperty(value = " 加油站活动id ")
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long petrolStationActivityId;

    @ApiModelProperty(value = " 加油站商品id ")
    private Long petrolStationProductId;

    @ApiModelProperty(value = " 活动名称 ")
    private String activityName;

    @ApiModelProperty(value = " 活动内容 ")
    private String activityContent;

    @ApiModelProperty(value = " 开始时间 ")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date startTime;

    @ApiModelProperty(value = " 结束时间 ")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date endTime;

    @ApiModelProperty(value = " 备注 ")
    private String remark;

    @ApiModelProperty(value = " 是否启用0否 1是 ")
    private Integer isOpen;

    @ApiModelProperty(value = " 添加时间 ")
    private Date createdTime;

    @ApiModelProperty(value = " 添加人 ")
    private String createdBy;

    @Transient
    private List<JyPetrolStationActivityDetil> detils;

    private static final long serialVersionUID = 1L;
}